package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;

public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fis = new FileOutputStream("osw.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fis, StandardCharsets.UTF_8);
        osw.write("天青色等烟雨，而我在等你，炊烟袅袅升起，隔江千万里");
        osw.write("在瓶底书汉隶仿前朝的飘逸，而我只为遇见你伏笔");
        System.out.println("写出完毕");
        osw.close();
    }
}
